package com.htao.train.batch.feign;

import com.htao.train.common.resp.CommonResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

/**
 * @Author： HTTT
 * @Date： 2024/1/9 22:18
 * @Describe：
 */
//@FeignClient("business")

@FeignClient(name = "business", url = "http://127.0.0.1:8002")
public interface BusinessFeign {

    @GetMapping("/business/hello")
    String hello();

    /**
     * 远程调用生成指定日期车次
     * @param date
     * @return
     */
    @GetMapping("/business/admin/daily-train/gen-daily/{date}")
    CommonResp<Object> genDaily(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);
}
